//V2.2.5 2021-10-25

//链接识别，替换成a标签函数
function changeUrl(str) {
    var reg = /(http:\/\/|https:\/\/)((\w|=|\?|\.|\/|&|-)+)/g;
    str = str.replace(reg, "<a href='$1$2'>$1$2</a>");
    return str
}
function getTime() {
    var time = new Date();
    // var day = ("0" + time.getDate()).slice(-2);
    // var month = ("0" + (time.getMonth() + 1)).slice(-2);
    var hour = ("0" + (time.getHours())).slice(-2);
    var minut = ("0" + (time.getMinutes())).slice(-2);
    // var now = time.getFullYear() + "-" + (month) + "-" + (day) + " " + (hour) + ":" + (minut);
    var now = (hour) + ":" + (minut);
    return now;
}
//获取url中的参数  
function getUrlParam(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象  
    var r = window.location.search.substr(1).match(reg); //匹配目标参数   
    if (r != null) return unescape(r[2]);
    return null; //返回参数值  
}
